home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / M-More Monthly Disks / (c)mc.d64 / drill ou_ow.c (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  4KB  |  206 lines

  1. 5 REM ***GRAMMAR DRILL***
  2. 7 REM DRILL IN SPELLING WORDS WITH
  3. 9 REM *OU/OW* SUITABLE FOR GRADES 4-8.
  4. 10 REM
  5. 11 REM PROGRAM DEVELOPED
  6. 13 REM BY J J URSANO SPRINGDALE PARK
  7. 14 REM BRACEBEODGE, ONTARIO APRIL/83
  8. 15 REM (null)
  9. 16 REM LINES 20 TO 510 SET UP AND
  10. 17 REM PRINT THE PROGRAM TITLE
  11. 18 REM
  12. 19 REM
  13. 20 PRINT"[147]"
  14. 21 POKE 53280,5:POKE53281,7:REM SCREEN COLOURS
  15. 22 PRINT"": REM SET CURSOR TO RED
  16. 23 REMCLOSE(null)
  17. 24 FOR I=1TO25
  18. 25 PRINT TAB(7)"[191]";
  19. 30 GOSUB 500
  20. 40 NEXT
  21. 45 PRINT
  22. 50 FOR I=1TO5
  23. 60 PRINT TAB(31)"[191]"
  24. 70 GOSUB 500
  25. 80 NEXT
  26. 90 FOR I=31 TO 7 STEP-1
  27. 100 PRINTTAB(I)"[145][191]"
  28. 110 GOSUB 500
  29. 120 NEXT
  30. 130 FOR I=1TO5
  31. 140 PRINT TAB(7)"[145][145][191]"
  32. 150 GOSUB 500
  33. 160 NEXT
  34. 170 PRINT"OU/OW"
  35. 180 PRINTTAB(14)"BY J. URSANO"
  36. 190 FOR Y=1TO3500:NEXT
  37. 200 PRINT"[147]"
  38. 499 GOTO 800
  39. 500 FOR L=1TO30:NEXT
  40. 510 RETURN
  41. 750 REM
  42. 760 REM
  43. 770 REM LINES 800 TO 950 ARE
  44. 780 REM INSTRUCTIONS FOR STUDENTS
  45. 785 REM
  46. 786 REM
  47. 790 PRINT"[147]"
  48. 800 PRINTTAB(8)"R E M E M B E R [146]"
  49. 810 PRINT"1) OU OR OW CAN SAY OU"
  50. 820 PRINT"2) OW SAYS LONG O"
  51. 840 PRINT"PRESS*ANY KEY*[146]WHEN READY"
  52. 850 GET K$:IF K$=""THEN 850
  53. 860 PRINT"[147]"
  54. 900 PRINT"TYPE THE MISSING LETTERS"
  55. 910 PRINT"TO COMPLETE THE WORD"
  56. 920 PRINT"EXAMPLE:"
  57. 925 PRINT "[163][163][163][163][163][163][163][163]"
  58. 930 PRINT "SH..T WOULD BE SHOU[146]T"
  59. 940 PRINT"[196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196][196]"
  60. 950 PRINT"PRESS*ANY KEY*[146]WHEN READY"
  61. 960 GET K$:IF K$=""THEN 960
  62. 2000 REM
  63. 2001 REM
  64. 2004 REM (null)
  65. 2005 REM PUTTING DATA INTO ARRAY
  66. 2010 REM A$=WORD WITH BLANK(M..TH)
  67. 2012 REM B$=CORRECT ANSWER(OU OR OW)
  68. 2014 REM C$=CORRECT WORD(MOUTH)
  69. 2016 REM P1 IS SIZE OF ARRAY
  70. 2018 REM
  71. 2019 P1=44
  72. 2020 DIMA$(P1),B$(P1),C$(P1)
  73. 2030 FOR I=1TOP1
  74. 2040 READA$(I),B$(I),C$(I)
  75. 2050 NEXT I
  76. 2059 REM
  77. 2060 REM  RANDOMIZE AND PRESENT WORDS
  78. 2065 REM AND SET COUNTER AT 0
  79. 2070 REM
  80. 2075 REM
  81. 2080 I=0:CO=0:N=0
  82. 2090 I=INT(P1*(RND(TI))+1)
  83. 2100 PRINT"[147]"
  84. 2105 POKE 53280,9:POKE53281,15:PRINT"[144]": REM SET CURSOR TO BLACK
  85. 2110 CO=CO+1
  86. 2120 PRINT"",TAB(13)
  87. 2130 PRINT""A$(I)
  88. 2140 PRINT"[145]",TAB(16)
  89. 2145 REM CHECK TO SEE THAT ANSWER IS
  90. 2147 REM CORRECT
  91. 2148 REM
  92. 2150 GETD$:IFD$=""THEN2150
  93. 2160 GETE$:IFE$=""THEN2160
  94. 2165 Z$=D$+E$
  95. 2170 PRINT"";Z$
  96. 2180 IF D$+E$=B$(I) THEN 2220
  97. 2190 PRINT"SORRY,THAT IS NOT CORRECT"
  98. 2200 PRINT"THE ANSWER IS ";C$(I)
  99. 2210 GOTO 2240
  100. 2220 N=N+1
  101. 2224 REM STUDENT OPTION TO CONTINUE
  102. 2226 REM OR TO CHECK SCORE
  103. 2228 REM
  104. 2230 PRINT"WELL DONE!"
  105. 2240 PRINT" PRESS SPACE BAR[146] TO CONTINUE"
  106. 2250 PRINT" PRESS S[146] TO SEE SCORE[146]"
  107. 2280 GET R$:IFR$=""THEN2280
  108. 2290 IF R$=CHR$(32) THEN 2090
  109. 2300 IF R$="S" THEN 5000
  110. 2315 GOTO 2280
  111. 2370 DATA"   ..CH","OU","OUCH[146]"
  112. 2380 DATA"ARR..","OW","ARROW[146]"
  113. 2505 REM
  114. 2510 REM
  115. 3000 REM DATA STATEMENTS BEGIN
  116. 3004 REM (null)
  117. 3005 REM
  118. 3006 REM
  119. 3008 REM (null)
  120. 3010 DATA"ALL..","OW","ALLOW[146]"
  121. 3020 DATA"  D..N","OW",RDOWN"
  122. 3030 [131]"  H..ND","OU","HOUNDWAIT"
  123. 3040 [131]"  R..","OW","ROWWAIT"
  124. 3050 [131]"  H..SE","OU","HOUSEWAIT"
  125. 3060 [131]" BR..N","OW","BROWNWAIT"
  126. 3070 [131]"  M..","OW","MOWWAIT"
  127. 3080 [131]" BL..","OW","BLOWWAIT"
  128. 3090 [131]"  H..L","OW","HOWLWAIT"
  129. 3100 [131]" ST..","OW","STOWWAIT"
  130. 3110 [131]"  M..TH","OU","MOUTHWAIT"
  131. 3120 [131]" GR..L","OW","GROWLWAIT"
  132. 3130 [131]" SH..ER","OW","SHOWERWAIT"
  133. 3140 [131]" KN..","OW","KNOWWAIT"
  134. 3150 [131]"  S..ND","OU","SOUNDWAIT"
  135. 3160 [131]" AR..ND","OU","AROUNDWAIT"
  136. 3170 [131]"  B..","OW","BOWWAIT"
  137. 3180 [131]"  D..N","OW","DOWNWAIT"
  138. 3190 [131]"  P..ND","OU","POUNDWAIT"
  139. 3200 [131]" SH..T","OU","SHOUTWAIT"
  140. 3210 [131]"  T..ER","OW","TOWERWAIT"
  141. 3220 [131]" SH..","OW","SHOWWAIT"
  142. 3230 [131]" GR..ING","OW","GROWINGWAIT"
  143. 3240 [131]" CR..D","OW","CROWDWAIT"
  144. 3250 [131]"  W..","OW","WOWWAIT"
  145. 3260 [131]"  H..","OW","HOWWAIT"
  146. 3270 [131]"   ..CH","OU","OUCHWAIT"
  147. 3280 [131]"ARR..","OW","ARROWWAIT"
  148. 3290 [131]"  C..ARD","OW","COWARDWAIT"
  149. 3300 [131]"BEL..","OW","BELOW"
  150. 3310 [131]"  P..DER","OW","POWDERWAIT"
  151. 3320 [131]" GR..","OW","GROWWAIT"
  152. 3330 [131]" BR..","OW","BROWWAIT"
  153. 3340 [131]" SL..LY","OW","SLOWLY"
  154. 3350 [131]"  B..ND","OU","BOUNDWAIT"
  155. 3360 [131]" FL..ER","OW","FLOWERWAIT"
  156. 3370 [131]" GR..L","OW","GROWLWAIT"
  157. 3380 [131]"BEL..","OW","BELOWWAIT"
  158. 3390 [131]"THR..","OW","THROWWAIT"
  159. 3400 [131]" SN..","OW","SNOW"
  160. 3410 [131]" CL..N","OW","CLOWNWAIT"
  161. 3420 [131]"  P..ER","OW","POWERWAIT"
  162. 3430 [131]" DR..N","OW","DROWNWAIT"
  163. 4900 [143]
  164. 4910 [143]
  165. 4920 [143] LINES 5000-10110 GIVES THE
  166. 4930 [143] STUDENT HIS SCORE AND
  167. 4940 [143] CALCULATES HIS PER CENT.
  168. 4950 [143] HE IS THEN GIVEN THE OPTION
  169. 4960 [143] OF STARTING AGAIN OR OF
  170. 4970 [143] LEAVING THE PROGRAM
  171. 4980 [143]
  172. 4990 [143]
  173. 5000 [153]"LOAD"
  174. 5010 [153]"YOU GOT"N"CORRECT OUT OF"CO
  175. 5020 [153]"THAT IS";[181](N[173]CO[172]100[170].5)"%"
  176. 10000 [153]"WOULD YOU LIKE TO TRY AGAIN?(YES/NO)"
  177. 10005 [133] A$
  178. 10010 [139] [200](A$,1)[178]"Y" [167] [138] 790
  179. 10015 [153]"LOAD"
  180. 10016 [143] [204]
  181. 10017 [143]
  182. 10018 [143]
  183. 10019 [143] THE BALANCE OF THE PROGRAM
  184. 10020 [143] PRINTS A HAPPY FACE WHICH
  185. 10021 [143] REMAINS ON THE SCREEN UNTIL
  186. 10022 [143] ANY KEY IS DEPRESSED.
  187. 10023 [143]
  188. 10024 [143]
  189. 10025 [153]"":[151]53280,5:[151]53281,0
  190. 10030 [153]"": [143] CURSOR TO WHITE
  191. 10050 [153][163]14)"    (null)(null)(null)"
  192. 10060 [153][163]14)"  (null)(null)   (null)(null)"
  193. 10070 [153][163]14)" (null)  * *  (null)"
  194. 10080 [153][163]14)"(null)    CHR$    (null)"
  195. 10090 [153][163]14)"(null)         (null)"
  196. 10100 [153][163]14)" (null) (null)(null)(null)(null)(null) (null)"
  197. 10110 [153][163]14)"  (null)     (null)"
  198. 10120 [153][163]14)"   (null)(null)(null)(null)(null)"
  199. 10125 [143] [204]
  200. 10300 [153]"OKAY, THANK YOU FOR PLAYING"
  201. 10310 [153]"...AND HAVE A HAPPY OU/OWWAIT DAY"
  202. 10320 [161] J$:[139] J$[178]""[167] 10320
  203. 10340 [153]"LOAD"
  204. 10341 [128]
  205. 20058 [143] [204]
  206.